-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PEP 677: Runtime Behavior Specification #2237
Conversation
Updates:
|
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
I’m going to have to take a backseat for now, but one source of inspiration could be the ’inspect’ module. |
Updates:
|
424099b
to
e8c71b8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Some of my more substantive comments can wait for the python-dev discussion if you prefer.)
pep-0677.rst
Outdated
kind: CallableTypeArgumentKind | ||
annotation: typing.Type | typing.TypeVar | typing.ParamSpec | ||
|
||
class CallableTypeArgumentKind(Enum): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes for very long enum names. Although perhaps @global_enum
could help?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't know @global_enum
was a thing!
Should https://docs.python.org/3.11/library/enum.html say something about it?
I had to do a code search on CPython to confirm it exists, search engines appear to be unaware of it.
Co-authored-by: Guido van Rossum <gvanrossum@gmail.com>
Updates:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Rest looks good, just need to fix two declarations.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, merging now.
I had forgotten to port the detailed spec from
https://docs.google.com/document/d/15nmTDA_39Lo-EULQQwdwYx_Q1IYX4dD5WPnHbFG71Lk/edit
(It was originally separate because I was concerned there might be too much debate and thrash to put it in the PEP, but that did not turn out to be true).